/* 
 * File:   Window.h
 * Author: pablo
 *
 * Created on 27 de septiembre de 2012, 12:33
 */

#ifndef WINDOW_H
#define	WINDOW_H

/**
 * cWindow 
 * Encapsula la ventana de Windows
 */
class cWindow {

protected:

    // Ancho y Alto de la ventana del cliente
    int m_Width, m_Height;

    // RGB del fondo de la ventana
    int m_red, m_green, m_blue;
    
    // Canal alpha de la ventana
    int m_alpha;
    
    // Depth, stencial y modo de la ventana
    int m_bpp, m_snl, m_mode;

    // Estado de la ventana activo?
    bool m_bActive;

    static cWindow* m_pGlobalWindow;
    
    std::string m_title;
public:
    
    static const int WINDOW_WIDTH = 0;
    static const int WINDOW_HEIGHT = 0;

    static const int WINDOW_RED = 0;
    static const int WINDOW_GREEN = 0;
    static const int WINDOW_BLUE = 0;
    static const int WINDOW_ALPHA = 0;

    static const int WINDOW_DEPTH = 0;
    static const int WINDOW_STENCIL = 0;
    static const int WINDOW_MODE = GLFW_WINDOW; //GLFW_FULLSCREEN, GLFW_WINDOW
    
    cWindow(
        std::string title,
        int mode,
        int width,
        int height,
        int red,
        int green,
        int blue,
        int alpha,
        int bpp,
        int snl
    );
    ~cWindow();
    
    virtual void InitInstance();

    bool IsActive() {
        return m_bActive;
    }

    static cWindow* GetMainWindow() {
        return m_pGlobalWindow;
    }

};

inline cWindow* MainWindow() {
    return cWindow::GetMainWindow();
}

#endif	/* WINDOW_H */

